<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

<div id="app">
    <!-- 在HTML标签中不区分大小写，驼峰命名要用短横线-分割 -->
    <cpn v-bind:c-info="info"></cpn>
</div>

<template id="cpn">
    <div>
        <h2>{{cInfo}}</h2>
    </div>
</template>

<script src="../js/vue.js"></script>
<script>
    const cpn = {
        template: '#cpn',
        props: {
            cInfo: {
                type: Object,
                default() {
                    return {}
                }
            }
        }
    }

    const app = new Vue({
        el: '#app',
        data: {
            info: {
                name: 'kele',
                age: 18,
                height: 1.80
            }
        },
        components: {
            cpn
        }
    })
</script>
</body>
</html>